package com.example.main;

import com.alibaba.excel.EasyExcel;
import com.example.entity.DemoData;
import com.example.listener.ExcelListener;

import javax.xml.transform.Source;
import java.util.ArrayList;
import java.util.List;

public class TestEasyExcelRead {
    public static void main(String[] args) {
        List<DemoData> demoDataList=new ArrayList<>();
        //实现excel读操作
        String filename = "F:\\gitee\\java\\write.xlsx";
        EasyExcel.read(filename, DemoData.class,new ExcelListener(demoDataList)).sheet().doRead();
        System.out.println(demoDataList);
    }
}
